package com.neutech.springframework.service.impl;

import com.neutech.springframework.entity.User;
import com.neutech.springframework.mapper.IUserMapper;
import com.neutech.springframework.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class UserServiceImpl implements IUserService {
    private IUserMapper mapper;
    @Autowired
    public void setMapper(IUserMapper mapper) {
        this.mapper = mapper;
    }
    @Cacheable(value = "user")
    @Override
    public List<User> selectAll() {
        return mapper.selectAll();
    }
}
